﻿using FittyWars.MathUtil;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FittyWars.BordUtils
{
    class Duck : Creature
    {
        public Random rand;
        private int times;
        private static int seed = 0xD0C4;

        public Duck()
            : base()
        {
            /*rand = new Random(seed++);
            Speed *= 2;
            List<Vector> vectors = new List<Vector>();
            for (int i = 3 + rand.Next(4); i > 0; i--)
            {
                vectors.Add(new Vector(
                    4*rand.NextDouble() - 2.0,
                    4*rand.NextDouble() - 2.0
                ));
            }
            m_crashSpace = new CrashSpace(new Polygon(vectors));*/
        }


        public override void Think(List<Element> nearElements)
        {
            if (times == 0)
            {
                Direction = (float)(2 * Math.PI * rand.NextDouble());
                times = 10;
            }
            else
            {
                times--;
            }
        }
    }
}
